package com.oamicnet.serviceone.server.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(
        topic = "order-topic",
        consumerGroup = "${rocketmq.consumer.group}"
)
public class OrderMessageConsumer implements RocketMQListener<OrderMessage> {

    @Override
    public void onMessage(OrderMessage message) {
        log.info("收到订单消息: {}", message);
        // 在这里处理订单消息
    }
}
